<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<head><meta http-equiv="refresh" content="1; url=http://localhost/hotel/admin/updatepassword.php"></head><?php 
header('Content-type: text/html; charset=utf-8');
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "root";
$mysql_database = "db_shop";

 $conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password);
mysql_query ("set names 'utf8'");




	$password = $_POST['new_pwd1'];
	$name = $_POST['name'];
	$sql="UPDATE hotel.operator SET password='$password' where name='$name'";
mysql_select_db($mysql_database);
   $result=mysql_query($sql);
   if($result == "")
   echo "出现错误,修改失败";
    else
	{
    echo '修改成功';
    }

?>
<body>
</body>
</html>
